<?php
declare (strict_types = 1);

namespace app\admin\controller;

use think\Request;
use think\facade\Db;

class AdInfo extends Base
{
    protected $middleware = [
        '\app\admin\middleware\LoginCheck',
        '\app\admin\middleware\UrlData',
//        '\app\admin\middleware\UrlCheck'

    ];

    //管理员控制器
    public function index(Request $request) //用户信息展示
    {
        $user_name = $request->user['admin_name'];

        $user = Db::table('user')       //查询出当前用户的数据
            ->where('user_account',$user_name)
            ->field('id,user_account,user_email,user_nickname,user_img')
            ->find();



        return view('',['user'=>$user]);
    }







}
